<div id="content">
	<div id="diagnostics">
		<h1>Diagnostics</h1>
		<p>This page shows some tests which make it easier to hunt down why things are not working as they should</p>
		<div>
			<h2 class="diag">Git support working correctly: <span class="diag_[test:diag.git_all yes][else no]"></span></h2>
			<ul>
				<li>
					<label class="diag">Git dir set in config</label>
					<div class="diag_result">
						<span class="diag_[test:diag.git_dir_set yes][else no]"></span>
						<div class="diag_note">
							[test:diag.git_dir_set]
							[else To set the git_dir, run the following command: 'submin2-admin [val subminenv] config set git_dir git']
						</div>
					</div>
				</li>
				<li>
					<label class="diag">Only new-style hooks</label>
					<div class="diag_result">
						<span class="diag_[test:diag.git_hooks_all_new yes][else no]"></span>
						<div class="diag_note">
							[test:diag.git_hooks_all_new][else The following repositories have old-style hooks: <ul>[iter:diag.git_old_hook_repos <li>[ival]</li>]</ul>They can be upgraded to new-style hooks with: 'submin2-admin [val subminenv] git hook update <em>reponame</em>']
						</div>
					</div>
				</li>
				<li>
					<label class="diag">Git hostname correct</label>
					<div class="diag_result">
						<span class="diag_[test:diag.git_hostname_ok yes][else no]"></span>
						<div class="diag_note">
							[test:diag.git_hostname_ok ]
							[else The 'git_ssh_host' config is not set, or it is set to a local address. Please set a good hostname reachable by everyone with the following command: 'submin2-admin [val subminenv] config set git_ssh_host <em>public_hostname</em>']
						</div>
					</div>
				</li>
				<li>
					<label class="diag">Git local ssh</label>
					<div class="diag_result">
						<span class="diag_[test:diag.git_admin_test yes][else no]"></span>
						<div class="diag_note">
							[test:diag.git_admin_test Could succesfully issue admin commands through SSH]
							[else Could not issue admin commands, error message:
<p>"[val diag.git_admin_test_errmsg]".</p>

<p>Please check that git_ssh_host_internal, git_ssh_port and git_user are setup correctly. You can check this with: 'submin2-admin [val subminenv] config get <em>value</em>'. Next check that you can actually connect to SSH: 'ssh <em>git_user</em>@<em>git_ssh_host_internal</em> -p <em>git_ssh_port</em> -i [val subminenv]/conf/id_dsa' (it should give a message like: 'submin2-admin git admin is not supposed to be called by users.')
</p>]
						</div>
					</div>
				</li>
				<li>
					<label class="diag">Git enabled</label>
					<div class="diag_result">
						<span class="diag_[test:diag.enabled_git yes][else no]"></span>
						<div class="diag_note">
							[test:diag.enabled_git To disable, run the following command: 'submin2-admin [val subminenv] config set vcs_plugins svn']
							[else To enable, run the following command: 'submin2-admin [val subminenv] config set vcs_plugins git,svn']
						</div>
					</div>
				</li>
			</ul>
			<h2 class="diag">Svn support working correctly: <span class="diag_[test:diag.svn_all yes][else no]"></span></h2>
			<ul>
				<li>
					<label class="diag">SVN dir set in config</label>
					<div class="diag_result">
						<span class="diag_[test:diag.svn_dir_set yes][else no]"></span>
						<div class="diag_note">
							[test:diag.svn_dir_set]
							[else To set the svn_dir, run the following command: 'submin2-admin [val subminenv] config set svn_dir svn']
						</div>
					</div>
				</li>
				[iter:diag.svn_apache_modules
				<li>
					<label class="diag">Apache '[ikey]'</label>
					<div class="diag_result">
						<span class="diag_[test:ival yes][else no]"></span>
						<div class="diag_note">
							[test:ival]
							[else The module '[ikey]' was not loaded. Please make sure it is.]
						</div>
					</div>
				</li>]
				<li>
					<label class="diag">SVN enabled</label>
					<div class="diag_result">
						<span class="diag_[test:diag.enabled_svn yes][else no]"></span>
						<div class="diag_note">
							[test:diag.enabled_svn To disable, run the following command: 'submin2-admin [val subminenv] config set vcs_plugins git']
							[else To enable, run the following command: 'submin2-admin [val subminenv] config set vcs_plugins git,svn']
						</div>
					</div>
				</li>
			</ul>
			<h2 class="diag">Trac support working correctly: <span class="diag_[test:diag.trac_all yes][else no]"></span></h2>
			<ul>
				<li>
					<label class="diag">Trac installed</label>
					<div class="diag_result">
						<span class="diag_[test:diag.installed_trac yes][else no]"></span>
						<div class="diag_note">
							[test:diag.installed_trac]
							[else trac-admin was not found, please install Trac. If you have installed Trac, but it cannot be found, check if the env_path config value is set correctly: 'submin2-admin [val subminenv] config get env_path'. Set it with 'submin2-admin [val subminenv] config set env_path <em>yourpath</em>']
						</div>
					</div>
				</li>
				<li>
					<label class="diag">Trac dir set in config</label>
					<div class="diag_result">
						<span class="diag_[test:diag.trac_dir_set yes][else no]"></span>
						<div class="diag_note">
							[test:diag.trac_dir_set]
							[else To set the trac_dir, run the following command: 'submin2-admin [val subminenv] config set trac_dir trac']
						</div>
					</div>
				</li>
				<li>
					<label class="diag">Trac enabled</label>
					<div class="diag_result">
						<span class="diag_[test:diag.enabled_trac yes][else no]"></span>
						<div class="diag_note">
							[test:diag.enabled_trac To disable, run the following command: 'submin2-admin [val subminenv] config set enabled_trac no']
							[else To enable, run the following command: 'submin2-admin [val subminenv] config set enabled_trac yes']
						</div>
					</div>
				</li>
			</ul>
		</div>
	</div>
</div>
